﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using A2DFramework.OSGI.BundleContexts;
using OrderPDFProcessor.PublicInterfaces;

namespace OrderPDFProcessor
{
    class Activator:A2DFramework.OSGI.BundleActivator
    {
        public override void Startup(BundleContext bc)
        {
            Console.WriteLine("OrderPDFProcessor Startup");

            BundleContext.Current.RegisterProvidedService<IPDFProcessorConfig, PDFProcessorConfigImpl>();
            BundleContext.Current.RegisterProvidedService<IPDFProcessor, PDFProcessorImpl>();
        }

        public override void Stop(BundleContext bc)
        {
            Console.WriteLine("OrderPDFProcessor Stop");

            BundleContext.Current.UnRegisterProvidedService<IPDFProcessorConfig, PDFProcessorConfigImpl>();
            BundleContext.Current.UnRegisterProvidedService<IPDFProcessor, PDFProcessorImpl>();
        }
    }
}
